Skip to content

Conversation

@attack68
Copy link
Contributor

@attack68 attack68 commented Jan 15, 2022

@aberres
Copy link
Contributor

aberres commented Jan 16, 2022

Can confirm this fixes a 1.4 regression we are triggering with our code base.

@jreback jreback added this to the 1.4 milestone Jan 16, 2022
@jreback jreback added the Styler conditional formatting using DataFrame.style label Jan 16, 2022
subset = non_reducing_slice(subset)
data = self.data.loc[subset]
if data.empty:
return self # don't use DataFrame.apply on empty df
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment is not needed but this should probably be a .copy()

@jreback jreback removed this from the 1.4 milestone Jan 16, 2022
@jreback jreback added this to the 1.5 milestone Jan 16, 2022
@attack68 attack68 merged commit d19a31e into pandas-dev:main Jan 17, 2022
@attack68 attack68 deleted the styler_empty_apply branch January 17, 2022 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Styler conditional formatting using DataFrame.style

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Misleading error message when incorrectly using DataFrame.style.apply

3 participants